﻿using System.Globalization;

namespace NetByDocker.Controllers;

[Route("api/[controller]/[action]")]
[ApiController]
public class TestController : ControllerBase
{
    private readonly ILogger<TestController> _logger;

    public TestController(ILogger<TestController> logger)
    {
        _logger = logger;
    }

    [HttpGet]
    public string GetDateTime()
    {
        var currTime = DateTime.Now.ToString(CultureInfo.CurrentCulture);
        _logger.LogInformation($"当前时间：{currTime}");
        return currTime;
    }
}